Page({
  data: {
    statusMsg: {
      1: '审核中',
      2: '审核成功',
      3: '审核失败'
    },
    statusType: {
      1: 'info',
      2: 'success',
      3: 'fail'
    }
  },
  onLoad({ id }) {
    this.detailRoom(id)
  },
  //获取房屋详情
  async detailRoom(id) {
    const res = await wx.http.get(`/room/${id}`)
    this.setData({
      ...res.data
    })
  },
  //编辑房屋
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.id,
    })
  }
})
